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

Side by Side Diff: components/omnibox/browser/omnibox_edit_unittest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 TEST_F(OmniboxEditTest, AlternateNavHasHTTP) { 376 TEST_F(OmniboxEditTest, AlternateNavHasHTTP) {
377 const TestingOmniboxClient* client = 377 const TestingOmniboxClient* client =
378 static_cast<TestingOmniboxClient*>(model()->client()); 378 static_cast<TestingOmniboxClient*>(model()->client());
379 const AutocompleteMatch match( 379 const AutocompleteMatch match(
380 model()->autocomplete_controller()->search_provider(), 0, false, 380 model()->autocomplete_controller()->search_provider(), 0, false,
381 AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED); 381 AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED);
382 const GURL alternate_nav_url("http://ab%20cd/"); 382 const GURL alternate_nav_url("http://ab%20cd/");
383 383
384 model()->OnSetFocus(false); // Avoids DCHECK in OpenMatch(). 384 model()->OnSetFocus(false); // Avoids DCHECK in OpenMatch().
385 model()->SetUserText(base::ASCIIToUTF16("http://ab cd")); 385 model()->SetUserText(base::ASCIIToUTF16("http://ab cd"));
386 model()->OpenMatch(match, CURRENT_TAB, alternate_nav_url, base::string16(), 386 model()->OpenMatch(match, WindowOpenDisposition::CURRENT_TAB,
387 0); 387 alternate_nav_url, base::string16(), 0);
388 EXPECT_TRUE(AutocompleteInput::HasHTTPScheme( 388 EXPECT_TRUE(AutocompleteInput::HasHTTPScheme(
389 client->alternate_nav_match().fill_into_edit)); 389 client->alternate_nav_match().fill_into_edit));
390 390
391 model()->SetUserText(base::ASCIIToUTF16("ab cd")); 391 model()->SetUserText(base::ASCIIToUTF16("ab cd"));
392 model()->OpenMatch(match, CURRENT_TAB, alternate_nav_url, base::string16(), 392 model()->OpenMatch(match, WindowOpenDisposition::CURRENT_TAB,
393 0); 393 alternate_nav_url, base::string16(), 0);
394 EXPECT_TRUE(AutocompleteInput::HasHTTPScheme( 394 EXPECT_TRUE(AutocompleteInput::HasHTTPScheme(
395 client->alternate_nav_match().fill_into_edit)); 395 client->alternate_nav_match().fill_into_edit));
396 } 396 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698