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

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

Issue 1362973004: Rename FROM_HERE to BLINK_FROM_HERE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 2 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 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3299 webViewHelper.initializeAndLoad(m_baseURL + firstURL, true, &client); 3299 webViewHelper.initializeAndLoad(m_baseURL + firstURL, true, &client);
3300 webViewHelper.webViewImpl()->resize(WebSize(pageWidth, pageHeight)); 3300 webViewHelper.webViewImpl()->resize(WebSize(pageWidth, pageHeight));
3301 webViewHelper.webViewImpl()->mainFrame()->setScrollOffset(WebSize(pageWidth / 4, pageHeight / 4)); 3301 webViewHelper.webViewImpl()->mainFrame()->setScrollOffset(WebSize(pageWidth / 4, pageHeight / 4));
3302 webViewHelper.webViewImpl()->setPageScaleFactor(pageScaleFactor); 3302 webViewHelper.webViewImpl()->setPageScaleFactor(pageScaleFactor);
3303 3303
3304 WebSize previousOffset = webViewHelper.webViewImpl()->mainFrame()->scrollOff set(); 3304 WebSize previousOffset = webViewHelper.webViewImpl()->mainFrame()->scrollOff set();
3305 float previousScale = webViewHelper.webViewImpl()->pageScaleFactor(); 3305 float previousScale = webViewHelper.webViewImpl()->pageScaleFactor();
3306 3306
3307 // Reload the page and end up at the same url. State should be propagated. 3307 // Reload the page and end up at the same url. State should be propagated.
3308 Platform::current()->currentThread()->taskRunner()->postTask( 3308 Platform::current()->currentThread()->taskRunner()->postTask(
3309 FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->ma inFrame(), toKURL(m_baseURL + firstURL), false)); 3309 BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl ()->mainFrame(), toKURL(m_baseURL + firstURL), false));
3310 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame()); 3310 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame());
3311 EXPECT_EQ(previousOffset.width, webViewHelper.webViewImpl()->mainFrame()->sc rollOffset().width); 3311 EXPECT_EQ(previousOffset.width, webViewHelper.webViewImpl()->mainFrame()->sc rollOffset().width);
3312 EXPECT_EQ(previousOffset.height, webViewHelper.webViewImpl()->mainFrame()->s crollOffset().height); 3312 EXPECT_EQ(previousOffset.height, webViewHelper.webViewImpl()->mainFrame()->s crollOffset().height);
3313 EXPECT_EQ(previousScale, webViewHelper.webViewImpl()->pageScaleFactor()); 3313 EXPECT_EQ(previousScale, webViewHelper.webViewImpl()->pageScaleFactor());
3314 3314
3315 // Reload the page using the cache. State should not be propagated. 3315 // Reload the page using the cache. State should not be propagated.
3316 Platform::current()->currentThread()->taskRunner()->postTask( 3316 Platform::current()->currentThread()->taskRunner()->postTask(
3317 FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->ma inFrame(), toKURL(m_baseURL + secondURL), false)); 3317 BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl ()->mainFrame(), toKURL(m_baseURL + secondURL), false));
3318 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame()); 3318 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame());
3319 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width) ; 3319 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width) ;
3320 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height ); 3320 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height );
3321 EXPECT_EQ(1.0f, webViewHelper.webViewImpl()->pageScaleFactor()); 3321 EXPECT_EQ(1.0f, webViewHelper.webViewImpl()->pageScaleFactor());
3322 3322
3323 // Reload the page while ignoring the cache. State should not be propagated. 3323 // Reload the page while ignoring the cache. State should not be propagated.
3324 Platform::current()->currentThread()->taskRunner()->postTask( 3324 Platform::current()->currentThread()->taskRunner()->postTask(
3325 FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->ma inFrame(), toKURL(m_baseURL + thirdURL), true)); 3325 BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl ()->mainFrame(), toKURL(m_baseURL + thirdURL), true));
3326 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame()); 3326 FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->m ainFrame());
3327 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width) ; 3327 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width) ;
3328 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height ); 3328 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height );
3329 EXPECT_EQ(1.0f, webViewHelper.webViewImpl()->pageScaleFactor()); 3329 EXPECT_EQ(1.0f, webViewHelper.webViewImpl()->pageScaleFactor());
3330 } 3330 }
3331 3331
3332 TEST_P(ParameterizedWebFrameTest, ReloadWhileProvisional) 3332 TEST_P(ParameterizedWebFrameTest, ReloadWhileProvisional)
3333 { 3333 {
3334 // Test that reloading while the previous load is still pending does not cau se the initial 3334 // Test that reloading while the previous load is still pending does not cau se the initial
3335 // request to get lost. 3335 // request to get lost.
(...skipping 4949 matching lines...) Expand 10 before | Expand all | Expand 10 after
8285 EXPECT_TRUE(resource); 8285 EXPECT_TRUE(resource);
8286 EXPECT_NE(0, resource->loadFinishTime()); 8286 EXPECT_NE(0, resource->loadFinishTime());
8287 8287
8288 DocumentLoader* loader = document->loader(); 8288 DocumentLoader* loader = document->loader();
8289 8289
8290 EXPECT_TRUE(loader); 8290 EXPECT_TRUE(loader);
8291 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); 8291 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime());
8292 } 8292 }
8293 8293
8294 } // namespace blink 8294 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/SpinLockTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698