OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 source_set("sessions") { | 5 source_set("sessions") { |
6 configs += [ "//build/config/compiler:enable_arc" ] | 6 configs += [ "//build/config/compiler:enable_arc" ] |
7 sources = [ | 7 sources = [ |
8 "ios_chrome_session_tab_helper.h", | 8 "ios_chrome_session_tab_helper.h", |
9 "ios_chrome_session_tab_helper.mm", | 9 "ios_chrome_session_tab_helper.mm", |
10 "ios_chrome_tab_restore_service_client.h", | 10 "ios_chrome_tab_restore_service_client.h", |
11 "ios_chrome_tab_restore_service_client.mm", | 11 "ios_chrome_tab_restore_service_client.mm", |
12 "ios_chrome_tab_restore_service_factory.cc", | 12 "ios_chrome_tab_restore_service_factory.cc", |
13 "ios_chrome_tab_restore_service_factory.h", | 13 "ios_chrome_tab_restore_service_factory.h", |
| 14 "session_service_ios.h", |
| 15 "session_service_ios.mm", |
14 "session_window_ios.h", | 16 "session_window_ios.h", |
15 "session_window_ios.mm", | 17 "session_window_ios.mm", |
16 ] | 18 ] |
17 deps = [ | 19 deps = [ |
18 "//base", | 20 "//base", |
19 "//components/keyed_service/ios", | 21 "//components/keyed_service/ios", |
20 "//components/sessions", | 22 "//components/sessions", |
21 "//ios/chrome/browser", | 23 "//ios/chrome/browser", |
22 "//ios/chrome/browser/browser_state", | 24 "//ios/chrome/browser/browser_state", |
23 "//ios/chrome/browser/tabs", | 25 "//ios/chrome/browser/tabs", |
24 "//ios/public/provider/chrome/browser", | 26 "//ios/public/provider/chrome/browser", |
25 "//ios/web", | 27 "//ios/web", |
26 "//url", | 28 "//url", |
27 ] | 29 ] |
28 public_deps = [ | 30 public_deps = [ |
29 ":sessions_non_arc", | 31 ":sessions_non_arc", |
30 ] | 32 ] |
31 allow_circular_includes_from = [ ":sessions_non_arc" ] | 33 allow_circular_includes_from = [ ":sessions_non_arc" ] |
32 } | 34 } |
33 | 35 |
34 source_set("sessions_non_arc") { | 36 source_set("sessions_non_arc") { |
35 visibility = [ ":sessions" ] | 37 visibility = [ ":sessions" ] |
36 sources = [ | 38 sources = [ |
37 "NSCoder+Compatibility.h", | 39 "NSCoder+Compatibility.h", |
38 "NSCoder+Compatibility.mm", | 40 "NSCoder+Compatibility.mm", |
39 "session_service.h", | |
40 "session_service.mm", | |
41 "session_util.h", | 41 "session_util.h", |
42 "session_util.mm", | 42 "session_util.mm", |
43 "tab_restore_service_delegate_impl_ios.h", | 43 "tab_restore_service_delegate_impl_ios.h", |
44 "tab_restore_service_delegate_impl_ios.mm", | 44 "tab_restore_service_delegate_impl_ios.mm", |
45 "tab_restore_service_delegate_impl_ios_factory.h", | 45 "tab_restore_service_delegate_impl_ios_factory.h", |
46 "tab_restore_service_delegate_impl_ios_factory.mm", | 46 "tab_restore_service_delegate_impl_ios_factory.mm", |
47 ] | 47 ] |
48 deps = [ | 48 deps = [ |
49 "//base", | 49 "//base", |
50 "//components/keyed_service/core", | 50 "//components/keyed_service/core", |
(...skipping 17 matching lines...) Expand all Loading... |
68 ] | 68 ] |
69 deps = [ | 69 deps = [ |
70 ":sessions", | 70 ":sessions", |
71 ] | 71 ] |
72 } | 72 } |
73 | 73 |
74 source_set("unit_tests") { | 74 source_set("unit_tests") { |
75 configs += [ "//build/config/compiler:enable_arc" ] | 75 configs += [ "//build/config/compiler:enable_arc" ] |
76 testonly = true | 76 testonly = true |
77 sources = [ | 77 sources = [ |
| 78 "session_service_ios_unittest.mm", |
78 "session_window_ios_unittest.mm", | 79 "session_window_ios_unittest.mm", |
79 ] | 80 ] |
80 deps = [ | 81 deps = [ |
81 ":sessions", | |
82 ":unit_tests_non_arc", | |
83 "//base", | |
84 "//ios/web", | |
85 "//testing/gtest", | |
86 ] | |
87 libs = [ "Foundation.framework" ] | |
88 } | |
89 | |
90 source_set("unit_tests_non_arc") { | |
91 configs += [ "//build/config/compiler:enable_arc" ] | |
92 testonly = true | |
93 sources = [ | |
94 "session_service_unittest.mm", | |
95 ] | |
96 deps = [ | |
97 ":resources_unit_tests", | 82 ":resources_unit_tests", |
98 ":sessions", | 83 ":sessions", |
99 "//base", | 84 "//base", |
100 "//ios/chrome/browser", | 85 "//ios/chrome/browser", |
101 "//ios/chrome/browser/browser_state:test_support", | 86 "//ios/chrome/browser/browser_state:test_support", |
102 "//ios/web", | 87 "//ios/web", |
103 "//ios/web:test_support", | 88 "//ios/web:test_support", |
104 "//testing/gtest", | 89 "//testing/gtest", |
105 "//third_party/ocmock", | 90 "//third_party/ocmock", |
106 ] | 91 ] |
| 92 libs = [ "Foundation.framework" ] |
107 } | 93 } |
108 | 94 |
109 bundle_data("resources_unit_tests") { | 95 bundle_data("resources_unit_tests") { |
110 visibility = [ ":unit_tests_non_arc" ] | 96 visibility = [ ":unit_tests" ] |
111 testonly = true | 97 testonly = true |
112 sources = [ | 98 sources = [ |
113 "//ios/chrome/test/data/sessions/corrupted.plist", | 99 "//ios/chrome/test/data/sessions/corrupted.plist", |
114 "//ios/chrome/test/data/sessions/session_m57.plist", | 100 "//ios/chrome/test/data/sessions/session_m57.plist", |
115 "//ios/chrome/test/data/sessions/session_m58.plist", | 101 "//ios/chrome/test/data/sessions/session_m58.plist", |
116 ] | 102 ] |
117 outputs = [ | 103 outputs = [ |
118 "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}
", | 104 "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}
", |
119 ] | 105 ] |
120 } | 106 } |
OLD | NEW |