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

Unified Diff: content/browser/gpu/webgl_conformance_tests.cc

Issue 11453026: Rename WebGLConformanceTests to WebGLConformanceTest (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years 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 | « content/browser/gpu/webgl_conformance_test_list_autogen.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/webgl_conformance_tests.cc
===================================================================
--- content/browser/gpu/webgl_conformance_tests.cc (revision 171329)
+++ content/browser/gpu/webgl_conformance_tests.cc (working copy)
@@ -1,90 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "base/file_util.h"
-#include "base/path_service.h"
-#include "base/utf_string_conversions.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/common/content_paths.h"
-#include "content/public/common/content_switches.h"
-#include "content/public/test/browser_test_utils.h"
-#include "content/shell/shell.h"
-#include "content/test/content_browser_test.h"
-#include "content/test/content_browser_test_utils.h"
-#include "content/test/gpu/gpu_test_config.h"
-#include "content/test/gpu/gpu_test_expectations_parser.h"
-#include "net/base/net_util.h"
-
-namespace content {
-
-class WebGLConformanceTests : public ContentBrowserTest {
- public:
- WebGLConformanceTests() {}
-
- virtual void SetUpCommandLine(CommandLine* command_line) {
- // Allow privileged WebGL extensions.
- command_line->AppendSwitch(switches::kEnablePrivilegedWebGLExtensions);
- }
-
- virtual void SetUpInProcessBrowserTestFixture() {
- FilePath webgl_conformance_path;
- PathService::Get(base::DIR_SOURCE_ROOT, &webgl_conformance_path);
- webgl_conformance_path = webgl_conformance_path.Append(
- FILE_PATH_LITERAL("third_party"));
- webgl_conformance_path = webgl_conformance_path.Append(
- FILE_PATH_LITERAL("webgl_conformance"));
- ASSERT_TRUE(file_util::DirectoryExists(webgl_conformance_path))
- << "Missing conformance tests: " << webgl_conformance_path.value();
-
- PathService::Get(DIR_TEST_DATA, &test_path_);
- test_path_ = test_path_.Append(FILE_PATH_LITERAL("gpu"));
- test_path_ = test_path_.Append(FILE_PATH_LITERAL("webgl_conformance.html"));
-
- ASSERT_TRUE(bot_config_.LoadCurrentConfig(NULL))
- << "Fail to load bot configuration";
- ASSERT_TRUE(bot_config_.IsValid())
- << "Invalid bot configuration";
-
- ASSERT_TRUE(test_expectations_.LoadTestExpectations(
- GPUTestExpectationsParser::kWebGLConformanceTest));
- }
-
- void RunTest(const std::string& url) {
- std::string test_name =
- testing::UnitTest::GetInstance()->current_test_info()->name();
- int32 expectation =
- test_expectations_.GetTestExpectation(test_name, bot_config_);
- if (expectation != GPUTestExpectationsParser::kGpuTestPass) {
- LOG(WARNING) << "Test " << test_name << " is bypassed";
- return;
- }
-
- DOMMessageQueue message_queue;
- NavigateToURL(shell(), net::FilePathToFileURL(test_path_));
-
- std::string message;
- NavigateToURL(shell(), GURL("javascript:start('" + url + "');"));
- ASSERT_TRUE(message_queue.WaitForMessage(&message));
-
- EXPECT_STREQ("\"SUCCESS\"", message.c_str()) << message;
- }
-
- private:
- FilePath test_path_;
- GPUTestBotConfig bot_config_;
- GPUTestExpectationsParser test_expectations_;
-};
-
-#define CONFORMANCE_TEST(name, url) \
-IN_PROC_BROWSER_TEST_F(WebGLConformanceTests, MANUAL_##name) { \
- RunTest(url); \
-}
-
-// The test declarations are located in webgl_conformance_test_list_autogen.h,
-// because the list is automatically generated by a script.
-// See: generate_webgl_conformance_test_list.py
-#include "webgl_conformance_test_list_autogen.h"
-
-} // namespace content
« no previous file with comments | « content/browser/gpu/webgl_conformance_test_list_autogen.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698