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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_test.cc

Issue 10696156: Disable ExtensionTabsTest.QueryLastFocusedWindowTabs due to flakyness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« 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 "chrome/browser/extensions/api/tabs/tabs.h" 5 #include "chrome/browser/extensions/api/tabs/tabs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 result_tabs = result.get(); 422 result_tabs = result.get();
423 // We should have one tab for each extra window. 423 // We should have one tab for each extra window.
424 EXPECT_EQ(kExtraWindows, result_tabs->GetSize()); 424 EXPECT_EQ(kExtraWindows, result_tabs->GetSize());
425 for (size_t i = 0; i < kExtraWindows; ++i) { 425 for (size_t i = 0; i < kExtraWindows; ++i) {
426 DictionaryValue* result_tab = NULL; 426 DictionaryValue* result_tab = NULL;
427 EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab)); 427 EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab));
428 EXPECT_NE(window_id, utils::GetInteger(result_tab, keys::kWindowIdKey)); 428 EXPECT_NE(window_id, utils::GetInteger(result_tab, keys::kWindowIdKey));
429 } 429 }
430 } 430 }
431 431
432 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryLastFocusedWindowTabs) { 432 // Flaky: http://crbug.com/136562
433 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DISABLED_QueryLastFocusedWindowTabs) {
433 const size_t kExtraWindows = 2; 434 const size_t kExtraWindows = 2;
434 for (size_t i = 0; i < kExtraWindows; ++i) 435 for (size_t i = 0; i < kExtraWindows; ++i)
435 CreateBrowser(browser()->profile()); 436 CreateBrowser(browser()->profile());
436 437
437 Browser* focused_window = CreateBrowser(browser()->profile()); 438 Browser* focused_window = CreateBrowser(browser()->profile());
438 #if defined(OS_MACOSX) 439 #if defined(OS_MACOSX)
439 // See BrowserWindowCocoa::Show. In tests, Browser::window()->IsActive won't 440 // See BrowserWindowCocoa::Show. In tests, Browser::window()->IsActive won't
440 // work unless we fake the browser being launched by the user. 441 // work unless we fake the browser being launched by the user.
441 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow( 442 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(
442 focused_window->window()->GetNativeWindow())); 443 focused_window->window()->GetNativeWindow()));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 542
542 static const char kArgsMaximizedWithBounds[] = 543 static const char kArgsMaximizedWithBounds[] =
543 "[%u, {\"state\": \"maximized\", \"width\": 500}]"; 544 "[%u, {\"state\": \"maximized\", \"width\": 500}]";
544 EXPECT_TRUE(MatchPattern( 545 EXPECT_TRUE(MatchPattern(
545 utils::RunFunctionAndReturnError( 546 utils::RunFunctionAndReturnError(
546 new UpdateWindowFunction(), 547 new UpdateWindowFunction(),
547 base::StringPrintf(kArgsMaximizedWithBounds, window_id), 548 base::StringPrintf(kArgsMaximizedWithBounds, window_id),
548 browser()), 549 browser()),
549 keys::kInvalidWindowStateError)); 550 keys::kInvalidWindowStateError));
550 } 551 }
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