OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 , m_didSendData(false) | 64 , m_didSendData(false) |
65 , m_didReceiveResponse(false) | 65 , m_didReceiveResponse(false) |
66 , m_didReceiveData(false) | 66 , m_didReceiveData(false) |
67 , m_didReceiveCachedMetadata(false) | 67 , m_didReceiveCachedMetadata(false) |
68 , m_didFinishLoading(false) | 68 , m_didFinishLoading(false) |
69 , m_didFail(false) | 69 , m_didFail(false) |
70 , m_runningMessageLoop(false) | 70 , m_runningMessageLoop(false) |
71 { | 71 { |
72 // Reuse one of the test files from WebFrameTest. | 72 // Reuse one of the test files from WebFrameTest. |
73 m_baseFilePath = Platform::current()->unitTestSupport()->webKitRootDir()
; | 73 m_baseFilePath = Platform::current()->unitTestSupport()->webKitRootDir()
; |
74 m_baseFilePath.append("/Source/WebKit/chromium/tests/data/"); | 74 m_baseFilePath.append("/Source/web/tests/data/"); |
75 m_frameFilePath = m_baseFilePath; | 75 m_frameFilePath = m_baseFilePath; |
76 m_frameFilePath.append("iframes_test.html"); | 76 m_frameFilePath.append("iframes_test.html"); |
77 } | 77 } |
78 | 78 |
79 WebCore::KURL RegisterMockedUrl(const std::string& urlRoot, const WTF::Strin
g& filename) | 79 WebCore::KURL RegisterMockedUrl(const std::string& urlRoot, const WTF::Strin
g& filename) |
80 { | 80 { |
81 WebURLResponse response; | 81 WebURLResponse response; |
82 response.initialize(); | 82 response.initialize(); |
83 response.setMIMEType("text/html"); | 83 response.setMIMEType("text/html"); |
84 WTF::String localPath = m_baseFilePath; | 84 WTF::String localPath = m_baseFilePath; |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 m_expectedLoader->loadAsynchronously(request, this); | 622 m_expectedLoader->loadAsynchronously(request, this); |
623 serveRequests(); | 623 serveRequests(); |
624 EXPECT_TRUE(m_didReceiveResponse); | 624 EXPECT_TRUE(m_didReceiveResponse); |
625 EXPECT_TRUE(m_didReceiveData); | 625 EXPECT_TRUE(m_didReceiveData); |
626 EXPECT_TRUE(m_didFinishLoading); | 626 EXPECT_TRUE(m_didFinishLoading); |
627 | 627 |
628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); | 628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); |
629 } | 629 } |
630 | 630 |
631 } | 631 } |
OLD | NEW |