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

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

Issue 2635963004: Revert of [EditCommandSource] Pass source from |Editor::Command| to |Editor::apply*()/insert*( (2/3) (Closed)
Patch Set: Fix revert conflcts Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.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 6494 matching lines...) Expand 10 before | Expand all | Expand 10 after
6505 webViewHelper.webView()->setSpellCheckClient(0); 6505 webViewHelper.webView()->setSpellCheckClient(0);
6506 6506
6507 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); 6507 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl();
6508 Document* document = frame->frame()->document(); 6508 Document* document = frame->frame()->document();
6509 Element* element = document->getElementById("data"); 6509 Element* element = document->getElementById("data");
6510 6510
6511 webViewHelper.webView()->settings()->setEditingBehavior( 6511 webViewHelper.webView()->settings()->setEditingBehavior(
6512 WebSettings::EditingBehaviorWin); 6512 WebSettings::EditingBehaviorWin);
6513 6513
6514 element->focus(); 6514 element->focus();
6515 frame->frame()->editor().replaceSelectionForSpellChecker("A"); 6515 frame->frame()->editor().replaceSelectionWithText(
6516 "A", false, false, InputEvent::InputType::InsertReplacementText);
6516 frame->frame()->spellChecker().cancelCheck(); 6517 frame->frame()->spellChecker().cancelCheck();
6517 } 6518 }
6518 6519
6519 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { 6520 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) {
6520 registerMockedHttpURLLoad("spell.html"); 6521 registerMockedHttpURLLoad("spell.html");
6521 FrameTestHelpers::WebViewHelper webViewHelper; 6522 FrameTestHelpers::WebViewHelper webViewHelper;
6522 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); 6523 webViewHelper.initializeAndLoad(m_baseURL + "spell.html");
6523 6524
6524 StubbornSpellCheckClient spellcheck; 6525 StubbornSpellCheckClient spellcheck;
6525 webViewHelper.webView()->setSpellCheckClient(&spellcheck); 6526 webViewHelper.webView()->setSpellCheckClient(&spellcheck);
(...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after
11267 11268
11268 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11269 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11269 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11270 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11270 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11271 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11271 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11272 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11272 11273
11273 webViewHelper.reset(); 11274 webViewHelper.reset();
11274 } 11275 }
11275 11276
11276 } // namespace blink 11277 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698