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

Unified Diff: chrome/test/data/webui/assertions-inl.h

Issue 7645007: WebUI Testing: async support - global mocking, deferred runs, continued run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor comment fix. Created 9 years, 4 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 | « chrome/test/data/webui/assertions.js ('k') | chrome/test/data/webui/async_gen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/assertions-inl.h
diff --git a/chrome/test/data/webui/assertions-inl.h b/chrome/test/data/webui/assertions-inl.h
deleted file mode 100644
index 0333c97c6ca016200f9a36f27e546fce048d242f..0000000000000000000000000000000000000000
--- a/chrome/test/data/webui/assertions-inl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011 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 "chrome/browser/ui/webui/chrome_web_ui.h"
-#include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h"
-#include "googleurl/src/gurl.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-using ::testing::_;
-using ::testing::Eq;
-using ::testing::StrictMock;
-
-// Dummy URL location for us to override.
-const char kDummyURL[] = "chrome://DummyURL/";
-
-// Returns a new WebUI object for the TabContents from |arg0|.
-ACTION(ReturnNewWebUI) {
- return new ChromeWebUI(arg0);
-}
-
-// Mock the TestChromeWebUIFactory::WebUIProvider to prove that we are called as
-// expected.
-class MockWebUIProvider : public TestChromeWebUIFactory::WebUIProvider {
- public:
- MockWebUIProvider();
- ~MockWebUIProvider();
-
- MOCK_METHOD2(NewWebUI, WebUI*(TabContents* tab_contents, const GURL& url));
-};
-
-class WebUIAssertionsTest : public WebUIBrowserTest {
- public:
- WebUIAssertionsTest();
-
- virtual void SetUpOnMainThread() OVERRIDE {
- WebUIBrowserTest::SetUpOnMainThread();
- TestChromeWebUIFactory::AddFactoryOverride(
- GURL(kDummyURL).host(), &mock_provider_);
- EXPECT_CALL(mock_provider_, NewWebUI(_, Eq(GURL(kDummyURL))))
- .WillOnce(ReturnNewWebUI());
- }
- virtual void CleanUpOnMainThread() OVERRIDE {
- WebUIBrowserTest::CleanUpOnMainThread();
- TestChromeWebUIFactory::RemoveFactoryOverride(
- GURL(kDummyURL).host());
- }
-
- StrictMock<MockWebUIProvider> mock_provider_;
-
- protected:
- ~WebUIAssertionsTest();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebUIAssertionsTest);
-};
« no previous file with comments | « chrome/test/data/webui/assertions.js ('k') | chrome/test/data/webui/async_gen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698