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

Side by Side Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_browsertest.cc

Issue 2639893002: Clean up unneeded JavaScript dialog parameter. (Closed)
Patch Set: rebase 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/logging.h"
5 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
6 #include "base/test/scoped_command_line.h" 7 #include "base/test/scoped_command_line.h"
7 #include "base/test/scoped_feature_list.h" 8 #include "base/test/scoped_feature_list.h"
8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h" 10 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/common/chrome_features.h" 12 #include "chrome/common/chrome_features.h"
12 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
13 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
14 #include "content/public/browser/render_frame_host.h" 15 #include "content/public/browser/render_frame_host.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 tab->GetMainFrame()->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script)); 104 tab->GetMainFrame()->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script));
104 runner->Run(); 105 runner->Run();
105 106
106 // The tab is closed while the dialog is up. 107 // The tab is closed while the dialog is up.
107 int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(tab); 108 int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(tab);
108 browser()->tab_strip_model()->CloseWebContentsAt(tab_index, 109 browser()->tab_strip_model()->CloseWebContentsAt(tab_index,
109 TabStripModel::CLOSE_NONE); 110 TabStripModel::CLOSE_NONE);
110 111
111 // No crash is good news. 112 // No crash is good news.
112 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698