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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert bad change Created 6 years, 1 month 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 <list> 5 #include <list>
6 #include <set> 6 #include <set>
7 7
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // Wait for the extension to set itself up and return control to us. 337 // Wait for the extension to set itself up and return control to us.
338 ASSERT_TRUE( 338 ASSERT_TRUE(
339 RunExtensionTest("webnavigation/serverRedirectSingleProcess")) 339 RunExtensionTest("webnavigation/serverRedirectSingleProcess"))
340 << message_; 340 << message_;
341 341
342 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); 342 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
343 content::WaitForLoadStop(tab); 343 content::WaitForLoadStop(tab);
344 344
345 ResultCatcher catcher; 345 ResultCatcher catcher;
346 GURL url(base::StringPrintf( 346 GURL url(base::StringPrintf(
347 "http://www.a.com:%d/" 347 "http://www.a.com:%u/"
348 "extensions/api_test/webnavigation/serverRedirectSingleProcess/a.html", 348 "extensions/api_test/webnavigation/serverRedirectSingleProcess/a.html",
349 embedded_test_server()->port())); 349 embedded_test_server()->port()));
350 350
351 ui_test_utils::NavigateToURL(browser(), url); 351 ui_test_utils::NavigateToURL(browser(), url);
352 352
353 url = GURL(base::StringPrintf( 353 url = GURL(base::StringPrintf(
354 "http://www.b.com:%d/server-redirect?http://www.b.com:%d/", 354 "http://www.b.com:%u/server-redirect?http://www.b.com:%u/",
355 embedded_test_server()->port(), 355 embedded_test_server()->port(),
356 embedded_test_server()->port())); 356 embedded_test_server()->port()));
357 357
358 ui_test_utils::NavigateToURL(browser(), url); 358 ui_test_utils::NavigateToURL(browser(), url);
359 359
360 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 360 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
361 } 361 }
362 362
363 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, ForwardBack) { 363 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, ForwardBack) {
364 ASSERT_TRUE(StartEmbeddedTestServer()); 364 ASSERT_TRUE(StartEmbeddedTestServer());
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 552 }
553 553
554 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessFragment) { 554 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessFragment) {
555 ASSERT_TRUE(StartEmbeddedTestServer()); 555 ASSERT_TRUE(StartEmbeddedTestServer());
556 556
557 // See crossProcessFragment/f.html. 557 // See crossProcessFragment/f.html.
558 DelayLoadStartAndExecuteJavascript call_script3( 558 DelayLoadStartAndExecuteJavascript call_script3(
559 test_navigation_listener(), 559 test_navigation_listener(),
560 embedded_test_server()->GetURL("/test3"), 560 embedded_test_server()->GetURL("/test3"),
561 "updateFragment()", 561 "updateFragment()",
562 base::StringPrintf("f.html?%d#foo", embedded_test_server()->port())); 562 base::StringPrintf("f.html?%u#foo", embedded_test_server()->port()));
563 563
564 // See crossProcessFragment/g.html. 564 // See crossProcessFragment/g.html.
565 DelayLoadStartAndExecuteJavascript call_script4( 565 DelayLoadStartAndExecuteJavascript call_script4(
566 test_navigation_listener(), 566 test_navigation_listener(),
567 embedded_test_server()->GetURL("/test4"), 567 embedded_test_server()->GetURL("/test4"),
568 "updateFragment()", 568 "updateFragment()",
569 base::StringPrintf("g.html?%d#foo", embedded_test_server()->port())); 569 base::StringPrintf("g.html?%u#foo", embedded_test_server()->port()));
570 570
571 ASSERT_TRUE(RunExtensionTest("webnavigation/crossProcessFragment")) 571 ASSERT_TRUE(RunExtensionTest("webnavigation/crossProcessFragment"))
572 << message_; 572 << message_;
573 } 573 }
574 574
575 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessHistory) { 575 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessHistory) {
576 ASSERT_TRUE(StartEmbeddedTestServer()); 576 ASSERT_TRUE(StartEmbeddedTestServer());
577 577
578 // See crossProcessHistory/e.html. 578 // See crossProcessHistory/e.html.
579 DelayLoadStartAndExecuteJavascript call_script2( 579 DelayLoadStartAndExecuteJavascript call_script2(
(...skipping 27 matching lines...) Expand all
607 607
608 // Wait for the extension to set itself up and return control to us. 608 // Wait for the extension to set itself up and return control to us.
609 ASSERT_TRUE(RunExtensionTest("webnavigation/crash")) << message_; 609 ASSERT_TRUE(RunExtensionTest("webnavigation/crash")) << message_;
610 610
611 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); 611 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
612 content::WaitForLoadStop(tab); 612 content::WaitForLoadStop(tab);
613 613
614 ResultCatcher catcher; 614 ResultCatcher catcher;
615 615
616 GURL url(base::StringPrintf( 616 GURL url(base::StringPrintf(
617 "http://www.a.com:%d/" 617 "http://www.a.com:%u/"
618 "extensions/api_test/webnavigation/crash/a.html", 618 "extensions/api_test/webnavigation/crash/a.html",
619 embedded_test_server()->port())); 619 embedded_test_server()->port()));
620 ui_test_utils::NavigateToURL(browser(), url); 620 ui_test_utils::NavigateToURL(browser(), url);
621 621
622 ui_test_utils::NavigateToURL(browser(), GURL(content::kChromeUICrashURL)); 622 ui_test_utils::NavigateToURL(browser(), GURL(content::kChromeUICrashURL));
623 623
624 url = GURL(base::StringPrintf( 624 url = GURL(base::StringPrintf(
625 "http://www.a.com:%d/" 625 "http://www.a.com:%u/"
626 "extensions/api_test/webnavigation/crash/b.html", 626 "extensions/api_test/webnavigation/crash/b.html",
627 embedded_test_server()->port())); 627 embedded_test_server()->port()));
628 ui_test_utils::NavigateToURL(browser(), url); 628 ui_test_utils::NavigateToURL(browser(), url);
629 629
630 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 630 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
631 } 631 }
632 632
633 #endif 633 #endif
634 634
635 } // namespace extensions 635 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/socket/udp_socket_unittest.cc ('k') | chrome/browser/extensions/app_background_page_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698