mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 881997 - Test to assure that conformance is only exposed on our conformant products. - r=dzbarsky
This commit is contained in:
parent
3ebab6a4c4
commit
f25d5a50b8
@ -4,3 +4,4 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DIRS += ['non-conf-tests']
|
||||
|
18
content/canvas/test/webgl/non-conf-tests/Makefile.in
Normal file
18
content/canvas/test/webgl/non-conf-tests/Makefile.in
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = @relativesrcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MOCHITEST_FILES = \
|
||||
test_webgl_conformance.html \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
5
content/canvas/test/webgl/non-conf-tests/moz.build
Normal file
5
content/canvas/test/webgl/non-conf-tests/moz.build
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>WebGL test: 'webgl' context request</title>
|
||||
<script src="/MochiKit/MochiKit.js"></script>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
||||
<body>
|
||||
<canvas id="c"></canvas>
|
||||
<script>
|
||||
|
||||
var canvas = document.getElementById('c');
|
||||
var gl = canvas.getContext('webgl');
|
||||
|
||||
var isAndroid = /Android/.test(navigator.userAgent);
|
||||
var shouldBeConformant = !isAndroid;
|
||||
|
||||
if (shouldBeConformant) {
|
||||
ok(gl, 'Expected conformance on: ' + navigator.userAgent);
|
||||
} else {
|
||||
ok(!gl, 'Unexpected conformance on: ' + navigator.userAgent);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user