OLD | NEW |
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 4405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4416 webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); | 4416 webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); |
4417 | 4417 |
4418 EXPECT_EQ(0, frame->frame()->selection().rootEditableElement()->scrollLeft()
); | 4418 EXPECT_EQ(0, frame->frame()->selection().rootEditableElement()->scrollLeft()
); |
4419 frame->moveRangeSelectionExtent(WebPoint(endWebRect.x + 500, endWebRect.y)); | 4419 frame->moveRangeSelectionExtent(WebPoint(endWebRect.x + 500, endWebRect.y)); |
4420 EXPECT_GE(frame->frame()->selection().rootEditableElement()->scrollLeft(), 1
); | 4420 EXPECT_GE(frame->frame()->selection().rootEditableElement()->scrollLeft(), 1
); |
4421 EXPECT_EQ("Lengthy text goes here.", selectionAsString(frame)); | 4421 EXPECT_EQ("Lengthy text goes here.", selectionAsString(frame)); |
4422 } | 4422 } |
4423 | 4423 |
4424 static int computeOffset(LayoutObject* layoutObject, int x, int y) | 4424 static int computeOffset(LayoutObject* layoutObject, int x, int y) |
4425 { | 4425 { |
4426 return VisiblePosition(layoutObject->positionForPoint(LayoutPoint(x, y))).de
epEquivalent().computeOffsetInContainerNode(); | 4426 return visiblePositionOf(layoutObject->positionForPoint(LayoutPoint(x, y))).
deepEquivalent().computeOffsetInContainerNode(); |
4427 } | 4427 } |
4428 | 4428 |
4429 // positionForPoint returns the wrong values for contenteditable spans. See | 4429 // positionForPoint returns the wrong values for contenteditable spans. See |
4430 // http://crbug.com/238334. | 4430 // http://crbug.com/238334. |
4431 TEST_P(ParameterizedWebFrameTest, DISABLED_PositionForPointTest) | 4431 TEST_P(ParameterizedWebFrameTest, DISABLED_PositionForPointTest) |
4432 { | 4432 { |
4433 registerMockedHttpURLLoad("select_range_span_editable.html"); | 4433 registerMockedHttpURLLoad("select_range_span_editable.html"); |
4434 FrameTestHelpers::WebViewHelper webViewHelper(this); | 4434 FrameTestHelpers::WebViewHelper webViewHelper(this); |
4435 initializeTextSelectionWebView(m_baseURL + "select_range_span_editable.html"
, &webViewHelper); | 4435 initializeTextSelectionWebView(m_baseURL + "select_range_span_editable.html"
, &webViewHelper); |
4436 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()->
mainFrame()); | 4436 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(webViewHelper.webView()->
mainFrame()); |
(...skipping 3633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8070 | 8070 |
8071 TEST_F(WebFrameTest, MaxFramesDetach) | 8071 TEST_F(WebFrameTest, MaxFramesDetach) |
8072 { | 8072 { |
8073 registerMockedHttpURLLoad("max-frames-detach.html"); | 8073 registerMockedHttpURLLoad("max-frames-detach.html"); |
8074 FrameTestHelpers::WebViewHelper webViewHelper; | 8074 FrameTestHelpers::WebViewHelper webViewHelper; |
8075 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); | 8075 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); |
8076 webViewImpl->mainFrameImpl()->collectGarbage(); | 8076 webViewImpl->mainFrameImpl()->collectGarbage(); |
8077 } | 8077 } |
8078 | 8078 |
8079 } // namespace blink | 8079 } // namespace blink |
OLD | NEW |