Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2154)

Unified Diff: samples/generate-texture.html

Issue 155885: Modified generate-texture to turn off texture filtering when run in selenium... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | tests/selenium/sample_list.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/generate-texture.html
===================================================================
--- samples/generate-texture.html (revision 21117)
+++ samples/generate-texture.html (working copy)
@@ -55,6 +55,7 @@
var g_pack;
var g_viewInfo;
var g_finished = false; // for selenium testing
+var g_samplers = [];
/**
* Creates the client area.
@@ -160,6 +161,7 @@
samplerParam.value = sampler;
sampler.addressModeU = g_o3d.Sampler.CLAMP;
sampler.addressModeV = g_o3d.Sampler.CLAMP;
+ g_samplers[s] = sampler;
// Create a texture.
{
@@ -269,9 +271,21 @@
sampler.texture = texture;
}
}
+ window.o3d_prepForSelenium = prepForSelenium;
window.g_finished = true; // for selenium testing.
}
+// Turn off all filtering in the samplers to get consistent testing
+// results.
+function prepForSelenium() {
+ for (var i = 0; i < g_samplers.length; i++) {
+ g_samplers[i].magFilter = g_o3d.Sampler.POINT;
+ g_samplers[i].minFilter = g_o3d.Sampler.POINT;
+ g_samplers[i].mipFilter = g_o3d.Sampler.NONE;
+ }
+}
+
+
</script>
</head>
<body onload="init()">
« no previous file with comments | « DEPS ('k') | tests/selenium/sample_list.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698