| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "public/platform/WebThread.h" | 75 #include "public/platform/WebThread.h" |
| 76 #include "public/platform/WebURL.h" | 76 #include "public/platform/WebURL.h" |
| 77 #include "public/platform/WebURLResponse.h" | 77 #include "public/platform/WebURLResponse.h" |
| 78 #include "public/platform/WebUnitTestSupport.h" | 78 #include "public/platform/WebUnitTestSupport.h" |
| 79 #include "public/web/WebDataSource.h" | 79 #include "public/web/WebDataSource.h" |
| 80 #include "public/web/WebDocument.h" | 80 #include "public/web/WebDocument.h" |
| 81 #include "public/web/WebFindOptions.h" | 81 #include "public/web/WebFindOptions.h" |
| 82 #include "public/web/WebFormElement.h" | 82 #include "public/web/WebFormElement.h" |
| 83 #include "public/web/WebFrameClient.h" | 83 #include "public/web/WebFrameClient.h" |
| 84 #include "public/web/WebHistoryItem.h" | 84 #include "public/web/WebHistoryItem.h" |
| 85 #include "public/web/WebPrintParams.h" |
| 85 #include "public/web/WebRange.h" | 86 #include "public/web/WebRange.h" |
| 86 #include "public/web/WebRemoteFrame.h" | 87 #include "public/web/WebRemoteFrame.h" |
| 87 #include "public/web/WebScriptSource.h" | 88 #include "public/web/WebScriptSource.h" |
| 88 #include "public/web/WebSearchableFormData.h" | 89 #include "public/web/WebSearchableFormData.h" |
| 89 #include "public/web/WebSecurityOrigin.h" | 90 #include "public/web/WebSecurityOrigin.h" |
| 90 #include "public/web/WebSecurityPolicy.h" | 91 #include "public/web/WebSecurityPolicy.h" |
| 91 #include "public/web/WebSettings.h" | 92 #include "public/web/WebSettings.h" |
| 92 #include "public/web/WebSpellCheckClient.h" | 93 #include "public/web/WebSpellCheckClient.h" |
| 93 #include "public/web/WebTextCheckingCompletion.h" | 94 #include "public/web/WebTextCheckingCompletion.h" |
| 94 #include "public/web/WebTextCheckingResult.h" | 95 #include "public/web/WebTextCheckingResult.h" |
| (...skipping 5699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5794 | 5795 |
| 5795 TEST_F(WebFrameTest, NodeImageTestFloatLeft) | 5796 TEST_F(WebFrameTest, NodeImageTestFloatLeft) |
| 5796 { | 5797 { |
| 5797 FrameTestHelpers::WebViewHelper webViewHelper; | 5798 FrameTestHelpers::WebViewHelper webViewHelper; |
| 5798 OwnPtr<blink::DragImage> dragImage = nodeImageTestSetup(&webViewHelper, std:
:string("case-float-left-overflow-hidden")); | 5799 OwnPtr<blink::DragImage> dragImage = nodeImageTestSetup(&webViewHelper, std:
:string("case-float-left-overflow-hidden")); |
| 5799 EXPECT_TRUE(dragImage); | 5800 EXPECT_TRUE(dragImage); |
| 5800 | 5801 |
| 5801 nodeImageTestValidation(blink::IntSize(40, 40), dragImage.get()); | 5802 nodeImageTestValidation(blink::IntSize(40, 40), dragImage.get()); |
| 5802 } | 5803 } |
| 5803 | 5804 |
| 5805 TEST_F(WebFrameTest, PrintingBasic) |
| 5806 { |
| 5807 FrameTestHelpers::WebViewHelper webViewHelper; |
| 5808 webViewHelper.initializeAndLoad("data:text/html,Hello, world."); |
| 5809 |
| 5810 WebFrame* frame = webViewHelper.webView()->mainFrame(); |
| 5811 |
| 5812 WebPrintParams printParams; |
| 5813 printParams.printContentArea.width = 500; |
| 5814 printParams.printContentArea.height = 500; |
| 5815 |
| 5816 int pageCount = frame->printBegin(printParams); |
| 5817 EXPECT_EQ(1, pageCount); |
| 5818 frame->printEnd(); |
| 5819 } |
| 5820 |
| 5804 class ThemeColorTestWebFrameClient : public FrameTestHelpers::TestWebFrameClient
{ | 5821 class ThemeColorTestWebFrameClient : public FrameTestHelpers::TestWebFrameClient
{ |
| 5805 public: | 5822 public: |
| 5806 ThemeColorTestWebFrameClient() | 5823 ThemeColorTestWebFrameClient() |
| 5807 : m_didNotify(false) | 5824 : m_didNotify(false) |
| 5808 { | 5825 { |
| 5809 } | 5826 } |
| 5810 | 5827 |
| 5811 void reset() | 5828 void reset() |
| 5812 { | 5829 { |
| 5813 m_didNotify = false; | 5830 m_didNotify = false; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6023 | 6040 |
| 6024 client.reset(); | 6041 client.reset(); |
| 6025 // Try to load the request with cross origin access. Should succeed. | 6042 // Try to load the request with cross origin access. Should succeed. |
| 6026 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests; | 6043 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests; |
| 6027 blink::DocumentThreadableLoader::loadResourceSynchronously( | 6044 blink::DocumentThreadableLoader::loadResourceSynchronously( |
| 6028 *frame->document(), blink::ResourceRequest(resourceUrl), client, options
, resourceLoaderOptions); | 6045 *frame->document(), blink::ResourceRequest(resourceUrl), client, options
, resourceLoaderOptions); |
| 6029 EXPECT_FALSE(client.failed()); | 6046 EXPECT_FALSE(client.failed()); |
| 6030 } | 6047 } |
| 6031 | 6048 |
| 6032 } // namespace | 6049 } // namespace |
| OLD | NEW |