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

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

Issue 1059963005: Mark ExtensionApiTest.WindowOpen as flaky (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_vector.h" 6 #include "base/memory/scoped_vector.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #define USE_ASH_PANELS 42 #define USE_ASH_PANELS
43 #endif 43 #endif
44 44
45 using content::OpenURLParams; 45 using content::OpenURLParams;
46 using content::Referrer; 46 using content::Referrer;
47 using content::WebContents; 47 using content::WebContents;
48 48
49 // The test uses the chrome.browserAction.openPopup API, which requires that the 49 // The test uses the chrome.browserAction.openPopup API, which requires that the
50 // window can automatically be activated. 50 // window can automatically be activated.
51 // See comments at BrowserActionInteractiveTest::ShouldRunPopupTest 51 // See comments at BrowserActionInteractiveTest::ShouldRunPopupTest
52 #if defined(OS_MACOSX) 52 // Fails flakily on all platforms. https://crbug.com/477691
53 #define MAYBE_WindowOpen DISABLED_WindowOpen 53 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpen) {
54 #else
55 #define MAYBE_WindowOpen WindowOpen
56 #endif
57 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WindowOpen) {
58 extensions::ResultCatcher catcher; 54 extensions::ResultCatcher catcher;
59 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ 55 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_
60 .AppendASCII("window_open").AppendASCII("spanning"))); 56 .AppendASCII("window_open").AppendASCII("spanning")));
61 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 57 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
62 } 58 }
63 59
64 int GetPanelCount(Browser* browser) { 60 int GetPanelCount(Browser* browser) {
65 #if defined(USE_ASH_PANELS) 61 #if defined(USE_ASH_PANELS)
66 return static_cast<int>(extensions::AppWindowRegistry::Get( 62 return static_cast<int>(extensions::AppWindowRegistry::Get(
67 browser->profile())->app_windows().size()); 63 browser->profile())->app_windows().size());
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 last_loaded_extension_id() + "/newtab.html"), 505 last_loaded_extension_id() + "/newtab.html"),
510 false, 506 false,
511 &newtab)); 507 &newtab));
512 508
513 // Extension API should succeed. 509 // Extension API should succeed.
514 bool result = false; 510 bool result = false;
515 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()", 511 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()",
516 &result)); 512 &result));
517 EXPECT_TRUE(result); 513 EXPECT_TRUE(result);
518 } 514 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698