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

Side by Side Diff: chrome/test/gpu/webgl_infobar_browsertest.cc

Issue 2633473003: Delete flaky WebGLInfoBarTest.ContextLossInfoBarReload test. (Closed)
Patch Set: Created 3 years, 11 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/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
82 content::NotificationService::AllSources()); 82 content::NotificationService::AllSources());
83 SimulateGPUCrash(browser()); 83 SimulateGPUCrash(browser());
84 infobar_added.Wait(); 84 infobar_added.Wait();
85 EXPECT_EQ(1u, 85 EXPECT_EQ(1u,
86 InfoBarService::FromWebContents( 86 InfoBarService::FromWebContents(
87 browser()->tab_strip_model()->GetActiveWebContents())-> 87 browser()->tab_strip_model()->GetActiveWebContents())->
88 infobar_count()); 88 infobar_count());
89 } 89 }
90 90
91 // This test is flaky. http://crbug.com/324555
92 IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, DISABLED_ContextLossInfoBarReload) {
93 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP"))
94 return;
95
96 content::DOMMessageQueue message_queue;
97
98 // Load page and wait for it to load.
99 content::WindowedNotificationObserver observer(
100 content::NOTIFICATION_LOAD_STOP,
101 content::NotificationService::AllSources());
102 ui_test_utils::NavigateToURL(
103 browser(),
104 content::GetFileUrlWithQuery(
105 gpu_test_dir_.AppendASCII("webgl.html"),
106 "query=kill_after_notification"));
107 observer.Wait();
108
109 std::string m;
110 ASSERT_TRUE(message_queue.WaitForMessage(&m));
111 EXPECT_EQ("\"LOADED\"", m);
112
113 message_queue.ClearQueue();
114
115 content::WindowedNotificationObserver infobar_added(
116 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
117 content::NotificationService::AllSources());
118 SimulateGPUCrash(browser());
119 infobar_added.Wait();
120 InfoBarService* infobar_service = InfoBarService::FromWebContents(
121 browser()->tab_strip_model()->GetActiveWebContents());
122 ASSERT_EQ(1u, infobar_service->infobar_count());
123 infobars::InfoBarDelegate* delegate =
124 infobar_service->infobar_at(0)->delegate();
125 ASSERT_TRUE(delegate->AsThreeDAPIInfoBarDelegate());
126 delegate->AsConfirmInfoBarDelegate()->Cancel();
127
128 // The page should reload and another message sent to the
129 // DomAutomationController.
130 m.clear();
131 ASSERT_TRUE(message_queue.WaitForMessage(&m));
132 EXPECT_EQ("\"LOADED\"", m);
133 }
134
135 // There isn't any point in adding a test which calls Accept() on the 91 // There isn't any point in adding a test which calls Accept() on the
136 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and 92 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and
137 // there's no concrete event that could be observed in response. 93 // there's no concrete event that could be observed in response.
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