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

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

Issue 117493002: Invert the owning relationship between WebFrame and Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment clarity? Created 7 years 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 | Annotate | Revision Log
« Source/web/WebFrameImpl.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 webViewHelper.webView()->resize(WebSize(640, 480)); 3184 webViewHelper.webView()->resize(WebSize(640, 480));
3185 webViewHelper.webView()->layout(); 3185 webViewHelper.webView()->layout();
3186 runPendingTasks(); 3186 runPendingTasks();
3187 3187
3188 static const char* kFindString = "result"; 3188 static const char* kFindString = "result";
3189 static const int kFindIdentifier = 12345; 3189 static const int kFindIdentifier = 12345;
3190 3190
3191 WebFindOptions options; 3191 WebFindOptions options;
3192 WebString searchText = WebString::fromUTF8(kFindString); 3192 WebString searchText = WebString::fromUTF8(kFindString);
3193 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame( )); 3193 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame( ));
3194 WebFrameImpl* secondFrame = toWebFrameImpl(mainFrame->traverseNext(false)); 3194 RefPtr<WebFrameImpl> secondFrame = toWebFrameImpl(mainFrame->traverseNext(fa lse));
3195 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); 3195 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame();
3196 3196
3197 // Detach the frame before finding. 3197 // Detach the frame before finding.
3198 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3198 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3199 3199
3200 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ; 3200 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ;
3201 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0)); 3201 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0));
3202 3202
3203 runPendingTasks(); 3203 runPendingTasks();
3204 EXPECT_FALSE(client.findResultsAreReady()); 3204 EXPECT_FALSE(client.findResultsAreReady());
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4883 4883
4884 // Call javascript to make the layer scrollable, and verify it. 4884 // Call javascript to make the layer scrollable, and verify it.
4885 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame(); 4885 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame();
4886 frame->executeScript(WebScriptSource("allowScroll();")); 4886 frame->executeScript(WebScriptSource("allowScroll();"));
4887 webViewHelper.webView()->layout(); 4887 webViewHelper.webView()->layout();
4888 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); 4888 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
4889 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); 4889 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
4890 } 4890 }
4891 4891
4892 } // namespace 4892 } // namespace
OLDNEW
« Source/web/WebFrameImpl.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698