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

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "public/web/WebScriptSource.h" 91 #include "public/web/WebScriptSource.h"
92 #include "public/web/WebSearchableFormData.h" 92 #include "public/web/WebSearchableFormData.h"
93 #include "public/web/WebSecurityOrigin.h" 93 #include "public/web/WebSecurityOrigin.h"
94 #include "public/web/WebSecurityPolicy.h" 94 #include "public/web/WebSecurityPolicy.h"
95 #include "public/web/WebSettings.h" 95 #include "public/web/WebSettings.h"
96 #include "public/web/WebSpellCheckClient.h" 96 #include "public/web/WebSpellCheckClient.h"
97 #include "public/web/WebTextCheckingCompletion.h" 97 #include "public/web/WebTextCheckingCompletion.h"
98 #include "public/web/WebTextCheckingResult.h" 98 #include "public/web/WebTextCheckingResult.h"
99 #include "public/web/WebViewClient.h" 99 #include "public/web/WebViewClient.h"
100 #include "web/WebLocalFrameImpl.h" 100 #include "web/WebLocalFrameImpl.h"
101 #include "web/WebRemoteFrameImpl.h"
101 #include "web/WebViewImpl.h" 102 #include "web/WebViewImpl.h"
102 #include "web/tests/FrameTestHelpers.h" 103 #include "web/tests/FrameTestHelpers.h"
103 #include "wtf/Forward.h" 104 #include "wtf/Forward.h"
104 #include "wtf/dtoa/utils.h" 105 #include "wtf/dtoa/utils.h"
105 #include <gmock/gmock.h> 106 #include <gmock/gmock.h>
106 #include <gtest/gtest.h> 107 #include <gtest/gtest.h>
107 #include <map> 108 #include <map>
108 #include <v8.h> 109 #include <v8.h>
109 110
110 namespace { 111 namespace {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 webViewHelper->webView()->settings()->setDefaultFontSize(12); 179 webViewHelper->webView()->settings()->setDefaultFontSize(12);
179 webViewHelper->webView()->resize(WebSize(640, 480)); 180 webViewHelper->webView()->resize(WebSize(640, 480));
180 } 181 }
181 182
182 PassOwnPtr<DragImage> nodeImageTestSetup(FrameTestHelpers::WebViewHelper* we bViewHelper, const std::string& testcase) 183 PassOwnPtr<DragImage> nodeImageTestSetup(FrameTestHelpers::WebViewHelper* we bViewHelper, const std::string& testcase)
183 { 184 {
184 registerMockedHttpURLLoad("nodeimage.html"); 185 registerMockedHttpURLLoad("nodeimage.html");
185 webViewHelper->initializeAndLoad(m_baseURL + "nodeimage.html"); 186 webViewHelper->initializeAndLoad(m_baseURL + "nodeimage.html");
186 webViewHelper->webView()->resize(WebSize(640, 480)); 187 webViewHelper->webView()->resize(WebSize(640, 480));
187 webViewHelper->webView()->layout(); 188 webViewHelper->webView()->layout();
188 RefPtr<LocalFrame> frame = toLocalFrame(webViewHelper->webViewImpl()->pa ge()->mainFrame()); 189 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(webViewHelper->webVi ewImpl()->page()->mainFrame());
190 ASSERT(frame);
189 Element* element = frame->document()->getElementById(testcase.c_str()); 191 Element* element = frame->document()->getElementById(testcase.c_str());
190 return frame->nodeImage(*element); 192 return frame->nodeImage(*element);
191 } 193 }
192 194
193 std::string m_baseURL; 195 std::string m_baseURL;
194 std::string m_chromeURL; 196 std::string m_chromeURL;
195 }; 197 };
196 198
197 class UseMockScrollbarSettings { 199 class UseMockScrollbarSettings {
198 public: 200 public:
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 std::string content = webViewHelper.webView()->mainFrame()->contentAsText(10 24).utf8(); 636 std::string content = webViewHelper.webView()->mainFrame()->contentAsText(10 24).utf8();
635 EXPECT_NE(std::string::npos, content.find("Message 1.")); 637 EXPECT_NE(std::string::npos, content.find("Message 1."));
636 EXPECT_EQ(std::string::npos, content.find("Message 2.")); 638 EXPECT_EQ(std::string::npos, content.find("Message 2."));
637 } 639 }
638 640
639 TEST_F(WebFrameTest, PostMessageThenDetach) 641 TEST_F(WebFrameTest, PostMessageThenDetach)
640 { 642 {
641 FrameTestHelpers::WebViewHelper webViewHelper; 643 FrameTestHelpers::WebViewHelper webViewHelper;
642 webViewHelper.initializeAndLoad("about:blank"); 644 webViewHelper.initializeAndLoad("about:blank");
643 645
644 RefPtr<LocalFrame> frame = toLocalFrame(webViewHelper.webViewImpl()->page()- >mainFrame()); 646 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(webViewHelper.webViewImp l()->page()->mainFrame());
645 NonThrowableExceptionState exceptionState; 647 NonThrowableExceptionState exceptionState;
646 frame->domWindow()->postMessage(SerializedScriptValue::create("message"), 0, "*", frame->domWindow(), exceptionState); 648 frame->domWindow()->postMessage(SerializedScriptValue::create("message"), 0, "*", frame->domWindow(), exceptionState);
647 webViewHelper.reset(); 649 webViewHelper.reset();
648 EXPECT_FALSE(exceptionState.hadException()); 650 EXPECT_FALSE(exceptionState.hadException());
649 651
650 // Success is not crashing. 652 // Success is not crashing.
651 runPendingTasks(); 653 runPendingTasks();
652 } 654 }
653 655
654 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient { 656 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient {
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 webViewHelper.webView()->resize(WebSize(640, 480)); 3479 webViewHelper.webView()->resize(WebSize(640, 480));
3478 webViewHelper.webView()->layout(); 3480 webViewHelper.webView()->layout();
3479 runPendingTasks(); 3481 runPendingTasks();
3480 3482
3481 static const char* kFindString = "result"; 3483 static const char* kFindString = "result";
3482 static const int kFindIdentifier = 12345; 3484 static const int kFindIdentifier = 12345;
3483 3485
3484 WebFindOptions options; 3486 WebFindOptions options;
3485 WebString searchText = WebString::fromUTF8(kFindString); 3487 WebString searchText = WebString::fromUTF8(kFindString);
3486 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame()); 3488 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame());
3487 RefPtr<WebLocalFrameImpl> secondFrame = toWebLocalFrameImpl(mainFrame->trave rseNext(false)); 3489 RefPtrWillBeRawPtr<WebLocalFrameImpl> secondFrame = toWebLocalFrameImpl(main Frame->traverseNext(false));
3488 RefPtr<LocalFrame> holdSecondFrame = secondFrame->frame(); 3490 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame());
3489 3491
3490 // Detach the frame before finding. 3492 // Detach the frame before finding.
3491 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3493 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3492 3494
3493 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ; 3495 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ;
3494 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0)); 3496 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0));
3495 3497
3496 runPendingTasks(); 3498 runPendingTasks();
3497 EXPECT_FALSE(client.findResultsAreReady()); 3499 EXPECT_FALSE(client.findResultsAreReady());
3498 3500
3499 mainFrame->resetMatchCount(); 3501 mainFrame->resetMatchCount();
3500 3502
3501 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3503 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3502 frame->scopeStringMatches(kFindIdentifier, searchText, options, true); 3504 frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3503 3505
3504 runPendingTasks(); 3506 runPendingTasks();
3505 EXPECT_TRUE(client.findResultsAreReady()); 3507 EXPECT_TRUE(client.findResultsAreReady());
3506
3507 holdSecondFrame.release();
3508 } 3508 }
3509 3509
3510 TEST_F(WebFrameTest, FindDetachFrameBeforeScopeStrings) 3510 TEST_F(WebFrameTest, FindDetachFrameBeforeScopeStrings)
3511 { 3511 {
3512 registerMockedHttpURLLoad("find_in_page.html"); 3512 registerMockedHttpURLLoad("find_in_page.html");
3513 registerMockedHttpURLLoad("find_in_page_frame.html"); 3513 registerMockedHttpURLLoad("find_in_page_frame.html");
3514 3514
3515 FindUpdateWebFrameClient client; 3515 FindUpdateWebFrameClient client;
3516 FrameTestHelpers::WebViewHelper webViewHelper; 3516 FrameTestHelpers::WebViewHelper webViewHelper;
3517 webViewHelper.initializeAndLoad(m_baseURL + "find_in_page.html", true, &clie nt); 3517 webViewHelper.initializeAndLoad(m_baseURL + "find_in_page.html", true, &clie nt);
3518 webViewHelper.webView()->resize(WebSize(640, 480)); 3518 webViewHelper.webView()->resize(WebSize(640, 480));
3519 webViewHelper.webView()->layout(); 3519 webViewHelper.webView()->layout();
3520 runPendingTasks(); 3520 runPendingTasks();
3521 3521
3522 static const char* kFindString = "result"; 3522 static const char* kFindString = "result";
3523 static const int kFindIdentifier = 12345; 3523 static const int kFindIdentifier = 12345;
3524 3524
3525 WebFindOptions options; 3525 WebFindOptions options;
3526 WebString searchText = WebString::fromUTF8(kFindString); 3526 WebString searchText = WebString::fromUTF8(kFindString);
3527 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame()); 3527 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame());
3528 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); 3528 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false));
3529 RefPtr<LocalFrame> holdSecondFrame = secondFrame->frame(); 3529 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame());
3530 3530
3531 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3531 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3532 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; 3532 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ;
3533 3533
3534 runPendingTasks(); 3534 runPendingTasks();
3535 EXPECT_FALSE(client.findResultsAreReady()); 3535 EXPECT_FALSE(client.findResultsAreReady());
3536 3536
3537 // Detach the frame between finding and scoping. 3537 // Detach the frame between finding and scoping.
3538 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3538 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3539 3539
3540 mainFrame->resetMatchCount(); 3540 mainFrame->resetMatchCount();
3541 3541
3542 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3542 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3543 frame->scopeStringMatches(kFindIdentifier, searchText, options, true); 3543 frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3544 3544
3545 runPendingTasks(); 3545 runPendingTasks();
3546 EXPECT_TRUE(client.findResultsAreReady()); 3546 EXPECT_TRUE(client.findResultsAreReady());
3547
3548 holdSecondFrame.release();
3549 } 3547 }
3550 3548
3551 TEST_F(WebFrameTest, FindDetachFrameWhileScopingStrings) 3549 TEST_F(WebFrameTest, FindDetachFrameWhileScopingStrings)
3552 { 3550 {
3553 registerMockedHttpURLLoad("find_in_page.html"); 3551 registerMockedHttpURLLoad("find_in_page.html");
3554 registerMockedHttpURLLoad("find_in_page_frame.html"); 3552 registerMockedHttpURLLoad("find_in_page_frame.html");
3555 3553
3556 FindUpdateWebFrameClient client; 3554 FindUpdateWebFrameClient client;
3557 FrameTestHelpers::WebViewHelper webViewHelper; 3555 FrameTestHelpers::WebViewHelper webViewHelper;
3558 webViewHelper.initializeAndLoad(m_baseURL + "find_in_page.html", true, &clie nt); 3556 webViewHelper.initializeAndLoad(m_baseURL + "find_in_page.html", true, &clie nt);
3559 webViewHelper.webView()->resize(WebSize(640, 480)); 3557 webViewHelper.webView()->resize(WebSize(640, 480));
3560 webViewHelper.webView()->layout(); 3558 webViewHelper.webView()->layout();
3561 runPendingTasks(); 3559 runPendingTasks();
3562 3560
3563 static const char* kFindString = "result"; 3561 static const char* kFindString = "result";
3564 static const int kFindIdentifier = 12345; 3562 static const int kFindIdentifier = 12345;
3565 3563
3566 WebFindOptions options; 3564 WebFindOptions options;
3567 WebString searchText = WebString::fromUTF8(kFindString); 3565 WebString searchText = WebString::fromUTF8(kFindString);
3568 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame()); 3566 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()-> mainFrame());
3569 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); 3567 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false));
3570 RefPtr<LocalFrame> holdSecondFrame = secondFrame->frame(); 3568 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame());
3571 3569
3572 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3570 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3573 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; 3571 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ;
3574 3572
3575 runPendingTasks(); 3573 runPendingTasks();
3576 EXPECT_FALSE(client.findResultsAreReady()); 3574 EXPECT_FALSE(client.findResultsAreReady());
3577 3575
3578 mainFrame->resetMatchCount(); 3576 mainFrame->resetMatchCount();
3579 3577
3580 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3578 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3581 frame->scopeStringMatches(kFindIdentifier, searchText, options, true); 3579 frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3582 3580
3583 // The first scopeStringMatches will have reset the state. Detach before it actually scopes. 3581 // The first scopeStringMatches will have reset the state. Detach before it actually scopes.
3584 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3582 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3585 3583
3586 runPendingTasks(); 3584 runPendingTasks();
3587 EXPECT_TRUE(client.findResultsAreReady()); 3585 EXPECT_TRUE(client.findResultsAreReady());
3588
3589 holdSecondFrame.release();
3590 } 3586 }
3591 3587
3592 TEST_F(WebFrameTest, ResetMatchCount) 3588 TEST_F(WebFrameTest, ResetMatchCount)
3593 { 3589 {
3594 registerMockedHttpURLLoad("find_in_generated_frame.html"); 3590 registerMockedHttpURLLoad("find_in_generated_frame.html");
3595 3591
3596 FindUpdateWebFrameClient client; 3592 FindUpdateWebFrameClient client;
3597 FrameTestHelpers::WebViewHelper webViewHelper; 3593 FrameTestHelpers::WebViewHelper webViewHelper;
3598 webViewHelper.initializeAndLoad(m_baseURL + "find_in_generated_frame.html", true, &client); 3594 webViewHelper.initializeAndLoad(m_baseURL + "find_in_generated_frame.html", true, &client);
3599 webViewHelper.webView()->resize(WebSize(640, 480)); 3595 webViewHelper.webView()->resize(WebSize(640, 480));
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
5333 registerMockedHttpURLLoad("iframe_reload.html"); 5329 registerMockedHttpURLLoad("iframe_reload.html");
5334 registerMockedHttpURLLoad("visible_iframe.html"); 5330 registerMockedHttpURLLoad("visible_iframe.html");
5335 TestCachePolicyWebFrameClient mainClient(0); 5331 TestCachePolicyWebFrameClient mainClient(0);
5336 TestCachePolicyWebFrameClient childClient(&mainClient); 5332 TestCachePolicyWebFrameClient childClient(&mainClient);
5337 mainClient.setChildWebFrameClient(&childClient); 5333 mainClient.setChildWebFrameClient(&childClient);
5338 5334
5339 FrameTestHelpers::WebViewHelper webViewHelper; 5335 FrameTestHelpers::WebViewHelper webViewHelper;
5340 webViewHelper.initializeAndLoad(m_baseURL + "iframe_reload.html", true, &mai nClient); 5336 webViewHelper.initializeAndLoad(m_baseURL + "iframe_reload.html", true, &mai nClient);
5341 5337
5342 WebLocalFrameImpl* mainFrame = webViewHelper.webViewImpl()->mainFrameImpl(); 5338 WebLocalFrameImpl* mainFrame = webViewHelper.webViewImpl()->mainFrameImpl();
5343 RefPtr<WebLocalFrameImpl> childFrame = toWebLocalFrameImpl(mainFrame->firstC hild()); 5339 RefPtrWillBeRawPtr<WebLocalFrameImpl> childFrame = toWebLocalFrameImpl(mainF rame->firstChild());
5344 ASSERT_EQ(childFrame->client(), &childClient); 5340 ASSERT_EQ(childFrame->client(), &childClient);
5345 EXPECT_EQ(mainClient.childFrameCreationCount(), 1); 5341 EXPECT_EQ(mainClient.childFrameCreationCount(), 1);
5346 EXPECT_EQ(childClient.willSendRequestCallCount(), 1); 5342 EXPECT_EQ(childClient.willSendRequestCallCount(), 1);
5347 EXPECT_EQ(childClient.cachePolicy(), WebURLRequest::UseProtocolCachePolicy); 5343 EXPECT_EQ(childClient.cachePolicy(), WebURLRequest::UseProtocolCachePolicy);
5348 5344
5349 FrameTestHelpers::reloadFrame(mainFrame); 5345 FrameTestHelpers::reloadFrame(mainFrame);
5350 5346
5351 // A new WebFrame should have been created, but the child WebFrameClient sho uld be reused. 5347 // A new WebFrame should have been created, but the child WebFrameClient sho uld be reused.
5352 ASSERT_NE(childFrame, toWebLocalFrameImpl(mainFrame->firstChild())); 5348 ASSERT_NE(childFrame, toWebLocalFrameImpl(mainFrame->firstChild()));
5353 ASSERT_EQ(toWebLocalFrameImpl(mainFrame->firstChild())->client(), &childClie nt); 5349 ASSERT_EQ(toWebLocalFrameImpl(mainFrame->firstChild())->client(), &childClie nt);
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
6186 { 6182 {
6187 FrameTestHelpers::WebViewHelper webViewHelper; 6183 FrameTestHelpers::WebViewHelper webViewHelper;
6188 webViewHelper.initializeAndLoad("about:blank"); 6184 webViewHelper.initializeAndLoad("about:blank");
6189 6185
6190 SchemeRegistry::registerURLSchemeAsDisplayIsolated("chrome"); 6186 SchemeRegistry::registerURLSchemeAsDisplayIsolated("chrome");
6191 6187
6192 // Cross-origin request. 6188 // Cross-origin request.
6193 KURL resourceUrl(ParsedURLString, "chrome://test.pdf"); 6189 KURL resourceUrl(ParsedURLString, "chrome://test.pdf");
6194 registerMockedChromeURLLoad("test.pdf"); 6190 registerMockedChromeURLLoad("test.pdf");
6195 6191
6196 RefPtr<LocalFrame> frame = toLocalFrame(webViewHelper.webViewImpl()->page()- >mainFrame()); 6192 RefPtrWillBeRawPtr<LocalFrame> frame(toLocalFrame(webViewHelper.webViewImpl( )->page()->mainFrame()));
6197 6193
6198 MockDocumentThreadableLoaderClient client; 6194 MockDocumentThreadableLoaderClient client;
6199 ThreadableLoaderOptions options; 6195 ThreadableLoaderOptions options;
6200 6196
6201 // First try to load the request with regular access. Should fail. 6197 // First try to load the request with regular access. Should fail.
6202 options.crossOriginRequestPolicy = UseAccessControl; 6198 options.crossOriginRequestPolicy = UseAccessControl;
6203 ResourceLoaderOptions resourceLoaderOptions; 6199 ResourceLoaderOptions resourceLoaderOptions;
6204 DocumentThreadableLoader::loadResourceSynchronously( 6200 DocumentThreadableLoader::loadResourceSynchronously(
6205 *frame->document(), ResourceRequest(resourceUrl), client, options, resou rceLoaderOptions); 6201 *frame->document(), ResourceRequest(resourceUrl), client, options, resou rceLoaderOptions);
6206 EXPECT_TRUE(client.failed()); 6202 EXPECT_TRUE(client.failed());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6268 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6273 6269
6274 // Neither should a page reload. 6270 // Neither should a page reload.
6275 localFrame->reload(); 6271 localFrame->reload();
6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6272 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6273 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6274 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6279 } 6275 }
6280 6276
6281 } // namespace 6277 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698