Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/web/public/test/http_server.h" | |
| 6 #include "ios/web/public/test/http_server_util.h" | |
| 7 #include "ios/web/shell/test/app/navigation_test_util.h" | |
| 8 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h" | |
| 9 #import "ios/web/shell/test/earl_grey/shell_matchers.h" | |
| 10 | |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 12 #error "This file requires ARC support." | |
| 13 #endif | |
| 14 | |
| 15 namespace { | |
| 16 // URL spec for test PDF page. | |
| 17 const char kTestPDFURL[] = | |
| 18 "http://ios/web/shell/test/http_server_files/testpage.pdf"; | |
| 19 } // namespace | |
| 20 | |
| 21 using web::shell_test_util::LoadUrl; | |
| 22 using web::test::HttpServer; | |
| 23 | |
| 24 // PDF test cases for the web shell. | |
| 25 @interface PDFTest : ShellBaseTestCase | |
| 26 @end | |
| 27 | |
| 28 @implementation PDFTest | |
| 29 | |
| 30 // Tests MIME type of the loaded PDF document. | |
| 31 - (void)testMIMEType { | |
| 32 web::test::SetUpFileBasedHttpServer(); | |
| 33 LoadUrl(HttpServer::MakeUrl(kTestPDFURL)); | |
| 34 [[EarlGrey selectElementWithMatcher:web::webViewMimeType("application/pdf")] | |
|
baxley
2016/07/26 18:21:36
Do you think this method is useful as a helper, wh
Eugene But (OOO till 7-30)
2016/07/27 01:15:46
I don't know the answer. I've made webViewInWebSta
| |
| 35 assertWithMatcher:grey_notNil()]; | |
| 36 } | |
| 37 | |
| 38 @end | |
| OLD | NEW |