• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

google / santa / 9976147425

17 Jul 2024 02:29PM UTC coverage: 63.269% (+0.08%) from 63.19%
9976147425

push

github

web-flow
GUI: Update activation policy for binary blocks (#1396)

Also fix threading issues with the `queueMessage:` method.

5656 of 13396 branches covered (42.22%)

Branch coverage included in aggregate %.

13 of 25 new or added lines in 1 file covered. (52.0%)

4 existing lines in 2 files now uncovered.

18836 of 25315 relevant lines covered (74.41%)

6012.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Source/gui/SNTDeviceMessageWindowController.m
1
/// Copyright 2015 Google Inc. All rights reserved.
2
///
3
/// Licensed under the Apache License, Version 2.0 (the "License");
4
/// you may not use this file except in compliance with the License.
5
/// You may obtain a copy of the License at
6
///
7
///    http://www.apache.org/licenses/LICENSE-2.0
8
///
9
///    Unless required by applicable law or agreed to in writing, software
10
///    distributed under the License is distributed on an "AS IS" BASIS,
11
///    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
///    See the License for the specific language governing permissions and
13
///    limitations under the License.
14

15
#import "Source/gui/SNTDeviceMessageWindowController.h"
16
#import "Source/gui/SNTDeviceMessageWindowView-Swift.h"
17

18
#import "Source/common/SNTBlockMessage.h"
19
#import "Source/common/SNTConfigurator.h"
20
#import "Source/common/SNTDeviceEvent.h"
21

22
NS_ASSUME_NONNULL_BEGIN
23

24
@interface SNTDeviceMessageWindowController ()
25
@property(copy, nullable) NSString *customMessage;
26
@end
27

28
@implementation SNTDeviceMessageWindowController
29

30
- (instancetype)initWithEvent:(SNTDeviceEvent *)event message:(nullable NSString *)message {
×
31
  self = [super init];
×
32
  if (self) {
×
33
    _event = event;
×
34
    _customMessage = message;
×
35
  }
×
36
  return self;
×
37
}
×
38

39
- (void)showWindow:(id)sender {
×
40
  if (self.window) [self.window orderOut:sender];
×
41

42
  self.window =
×
43
    [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 0, 0)
×
44
                                styleMask:NSWindowStyleMaskClosable | NSWindowStyleMaskTitled
×
45
                                  backing:NSBackingStoreBuffered
×
46
                                    defer:NO];
×
47
  self.window.contentViewController =
×
48
    [SNTDeviceMessageWindowViewFactory createWithWindow:self.window
×
49
                                                  event:self.event
×
50
                                              customMsg:self.attributedCustomMessage];
×
51
  self.window.delegate = self;
×
52

UNCOV
53
  [super showWindow:sender];
×
54
}
×
55

56
- (NSAttributedString *)attributedCustomMessage {
×
UNCOV
57
  return [SNTBlockMessage formatMessage:self.customMessage];
×
58
}
×
59

60
- (NSString *)messageHash {
×
61
  return self.event.mntonname;
×
62
}
×
63

64
@end
65

66
NS_ASSUME_NONNULL_END
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc