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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view_browsertest.cc

Issue 2660553005: Harmony - convert hung renderer dialog. (Closed)
Patch Set: comments 2 Created 3 years, 10 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "base/command_line.h"
8 #include "chrome/browser/platform_util.h"
9 #include "chrome/browser/ui/browser.cc"
10 #include "chrome/browser/ui/tab_dialogs.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
12 #include "chrome/browser/ui/test/test_browser_dialog.h"
13 #include "chrome/browser/ui/views/hung_renderer_view.h"
14 #include "content/public/browser/web_contents_unresponsive_state.h"
15 #include "ui/base/ui_base_switches.h"
16
17 class HungRendererDialogViewBrowserTest : public DialogBrowserTest {
18 public:
19 HungRendererDialogViewBrowserTest() {}
20
21 // DialogBrowserTest:
22 void ShowDialog(const std::string& name) override {
23 content::WebContents* web_contents =
24 browser()->tab_strip_model()->GetActiveWebContents();
Peter Kasting 2017/02/06 21:44:51 Nit: Can fit on one line (and be just as clear) wi
Bret 2017/02/09 00:49:49 Done.
25 TabDialogs::FromWebContents(web_contents)
26 ->ShowHungRendererDialog(content::WebContentsUnresponsiveState());
27 }
28
29 // content::BrowserTestBase:
30 void SetUpCommandLine(base::CommandLine* command_line) override {
31 command_line->AppendSwitch(switches::kExtendMdToSecondaryUi);
Peter Kasting 2017/02/06 21:44:51 Do we need/want to force this here? Seems OK to j
Bret 2017/02/09 00:49:49 I felt like people who are using this suite don't
32 }
33
34 private:
35 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogViewBrowserTest);
36 };
37
38 // Invokes the hung renderer (aka page unresponsive) dialog. See
39 // test_browser_dialog.h.
40 IN_PROC_BROWSER_TEST_F(HungRendererDialogViewBrowserTest,
41 InvokeDialog_default) {
42 RunDialog();
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698