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

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

Issue 2508793002: Make exceptionState parameter of Document::createElement() to have default value (Closed)
Patch Set: 2016-11-16T15:26:06 Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 ->getActiveWebInputMethodController(); 912 ->getActiveWebInputMethodController();
913 913
914 // The test requires non-empty composition. 914 // The test requires non-empty composition.
915 std::string compositionText("hello"); 915 std::string compositionText("hello");
916 WebVector<WebCompositionUnderline> emptyUnderlines; 916 WebVector<WebCompositionUnderline> emptyUnderlines;
917 activeInputMethodController->setComposition( 917 activeInputMethodController->setComposition(
918 WebString::fromUTF8(compositionText.c_str()), emptyUnderlines, 5, 5); 918 WebString::fromUTF8(compositionText.c_str()), emptyUnderlines, 5, 5);
919 919
920 // Do arbitrary change to make layout dirty. 920 // Do arbitrary change to make layout dirty.
921 Document& document = *webView->mainFrameImpl()->frame()->document(); 921 Document& document = *webView->mainFrameImpl()->frame()->document();
922 Element* br = document.createElement("br", ASSERT_NO_EXCEPTION); 922 Element* br = document.createElement("br");
923 document.body()->appendChild(br); 923 document.body()->appendChild(br);
924 924
925 // Should not hit assertion when calling 925 // Should not hit assertion when calling
926 // WebInputMethodController::finishComposingText with non-empty composition 926 // WebInputMethodController::finishComposingText with non-empty composition
927 // and dirty layout. 927 // and dirty layout.
928 activeInputMethodController->finishComposingText( 928 activeInputMethodController->finishComposingText(
929 WebInputMethodController::KeepSelection); 929 WebInputMethodController::KeepSelection);
930 } 930 }
931 931
932 TEST_P(WebViewTest, FinishComposingTextCursorPositionChange) { 932 TEST_P(WebViewTest, FinishComposingTextCursorPositionChange) {
(...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 .translate(50, 55) 4349 .translate(50, 55)
4350 .scale(1. / 2.f); 4350 .scale(1. / 2.f);
4351 EXPECT_EQ(expectedMatrix, 4351 EXPECT_EQ(expectedMatrix,
4352 webViewImpl->getDeviceEmulationTransformForTesting()); 4352 webViewImpl->getDeviceEmulationTransformForTesting());
4353 // visibleContentRect doesn't change. 4353 // visibleContentRect doesn't change.
4354 EXPECT_EQ(IntRect(50, 55, 50, 75), 4354 EXPECT_EQ(IntRect(50, 55, 50, 75),
4355 *devToolsEmulator->visibleContentRectForPainting()); 4355 *devToolsEmulator->visibleContentRectForPainting());
4356 } 4356 }
4357 4357
4358 } // namespace blink 4358 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698