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

Side by Side Diff: chrome/browser/extensions/stubs_apitest.cc

Issue 555633003: Use extensions::ResultCatcher; delete ExtensionApiTest::ResultCatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/common/chrome_paths.h" 6 #include "chrome/common/chrome_paths.h"
7 #include "chrome/test/base/ui_test_utils.h" 7 #include "chrome/test/base/ui_test_utils.h"
8 #include "extensions/test/result_catcher.h"
8 #include "net/test/embedded_test_server/embedded_test_server.h" 9 #include "net/test/embedded_test_server/embedded_test_server.h"
9 #include "url/gurl.h" 10 #include "url/gurl.h"
10 11
11 // Tests that we throw errors when you try using extension APIs that aren't 12 // Tests that we throw errors when you try using extension APIs that aren't
12 // supported in content scripts. 13 // supported in content scripts.
13 // Timey-outy on mac. http://crbug.com/89116 14 // Timey-outy on mac. http://crbug.com/89116
14 #if defined(OS_MACOSX) 15 #if defined(OS_MACOSX)
15 #define MAYBE_Stubs DISABLED_Stubs 16 #define MAYBE_Stubs DISABLED_Stubs
16 #else 17 #else
17 #define MAYBE_Stubs Stubs 18 #define MAYBE_Stubs Stubs
18 #endif 19 #endif
19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Stubs) { 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Stubs) {
20 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 21 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
21 22
22 ASSERT_TRUE(RunExtensionTest("stubs")) << message_; 23 ASSERT_TRUE(RunExtensionTest("stubs")) << message_;
23 24
24 // Navigate to a simple http:// page, which should get the content script 25 // Navigate to a simple http:// page, which should get the content script
25 // injected and run the rest of the test. 26 // injected and run the rest of the test.
26 GURL url(embedded_test_server()->GetURL("/extensions/test_file.html")); 27 GURL url(embedded_test_server()->GetURL("/extensions/test_file.html"));
27 ui_test_utils::NavigateToURL(browser(), url); 28 ui_test_utils::NavigateToURL(browser(), url);
28 29
29 ResultCatcher catcher; 30 extensions::ResultCatcher catcher;
30 ASSERT_TRUE(catcher.GetNextResult()); 31 ASSERT_TRUE(catcher.GetNextResult());
31 } 32 }
32 33
33 // Tests that all API features that are available to a platform app actually 34 // Tests that all API features that are available to a platform app actually
34 // can be used in an app. For example, this test will fail if a developer adds 35 // can be used in an app. For example, this test will fail if a developer adds
35 // an API feature without providing a schema. http://crbug.com/369318 36 // an API feature without providing a schema. http://crbug.com/369318
36 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, StubsApp) { 37 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, StubsApp) {
37 ASSERT_TRUE(RunPlatformAppTestWithFlags( 38 ASSERT_TRUE(RunPlatformAppTestWithFlags(
38 "stubs_app", static_cast<int>(kFlagIgnoreManifestWarnings))) 39 "stubs_app", static_cast<int>(kFlagIgnoreManifestWarnings)))
39 << message_; 40 << message_;
40 } 41 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/lazy_background_page_apitest.cc ('k') | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698